<template>
  <!-- 详情 -->
  <el-dialog title="企业场所授权详情" :visible.sync="dialogVisible" width="50%" append-to-body :close-on-click-modal="false"
    :before-close="closedialog">
    <el-descriptions :column="2" border>
      <el-descriptions-item>
        <template slot="label">
          企业代码
        </template>
        {{form.entCode}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所代码
        </template>
        {{form.fieldCode}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          做单授权
        </template>
        <dict-tag :options="dict.type.yes_or_no" :value="form.genBillsMark" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申报授权
        </template>
        <dict-tag :options="dict.type.yes_or_no" :value="form.declBillsMark" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          查询授权
        </template>
        <dict-tag :options="dict.type.yes_or_no" :value="form.queryDataMark" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          一站式授权
        </template>
        <dict-tag :options="dict.type.yes_or_no" :value="form.osdMark" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申请时间
        </template>
        {{form.applyTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申请说明
        </template>
        {{form.applyNote}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          认证状态
        </template>
        <dict-tag :options="dict.type.ent_audit_status" :value="form.authStatus" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          认证意见
        </template>
        {{form.authRemark}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          认证人
        </template>
        {{form.auther}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          认证时间
        </template>
        {{form.authTime}}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center;">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import {
    getEnterpriseFieldAuth
  } from "@/api/system/enterpriseFieldAuth";
  export default {
    props: {
      dict: {}
    },
    data() {
      return {
        //显示详情
        dialogVisible: false,
        form: {
          id: null,
          entCode: null,
          fieldCode: null,
          genBillsMark: null,
          declBillsMark: null,
          queryDataMark: null,
          osdMark: null,
          applyTime: null,
          applyNote: null,
          authStatus: null,
          authRemark: null,
          auther: null,
          authTime: null
        }
      }
    },
    methods: {
      open(row) {
        this.dialogVisible = true;
        this.loadDetail(row);
      },
      closedialog() {
        this.dialogVisible = false
      },
      // 获取详情
      loadDetail(row) {
        getEnterpriseFieldAuth(row.id).then((res) => {
          if (res.code == 200) {
            this.form = res.data;
          }
        });
      },
    }
  };
</script>

<style>

</style>
